/**
 * Created by Shinelon on 2017/2/14.
 */

var express = require("express");
var config = require('./bin/configure');
var path = require('path');
var favicon = require('express-favicon');


app = express();

app.use(favicon(__dirname + '/public/img/favicon.png'));


app.set("views", path.join(__dirname, "views"));

//process.env.PORT为应用在系统的端口号
app.set('port', process.env.PORT || 3000);



app = config(app);

app.use(function (req, res, next) {
    res.status(404);
    res.send("Not Found!");
});


app.listen(app.get('port'), function () {
    console.log("APP started on port 3000.");
})

